<template>
  <div>
    <div class="right-bottom-fixd-container">
      <!-- 页面右下角的固定栏，有“回到顶部”，“购物车” -->
      <!-- <el-button type="primary" plain icon="el-icon-shopping-cart-full" /> -->
      <!-- <button>
        <i class="el-icon-shopping-cart-full" />
      </button>-->
      <el-button plain @click="toCart">
        <i class="el-icon-shopping-cart-2" />
      </el-button>
    </div>
    <div class="dochat">
      <el-tooltip class="item" effect="light" placement="left">
        <div slot="content">如有疑问联系客服：<br>13794943414</div>
        <el-button plain>
          <i class="el-icon-phone-outline" />
        </el-button>
      </el-tooltip>
    </div>
  </div>
</template>

<script>
export default {
  name: 'RightBottomFixd',
  data() {
    return {
      drawer: false
    }
  },
  methods: {
    toCart() {
      if (this.$route.path === '/profile/cart') {
        // this.$router.replace('/profile/cart')
        location.reload()
      } else {
        this.$router.push('/profile/2')
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.right-bottom-fixd-container {
  position: fixed;
  bottom: 120px;
  right: 40px;
  .el-button {
    text-align: center;
    padding: 1px 6px;
    background-color: #ebeef5;
  }
  button {
    display: block;
    width: 40px;
    height: 40px;
    background-color: #f2f5f6;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
    border-radius: 5px;
    border: 0;
  }
}
.dochat{
  position: fixed;
  bottom: 160px;
  right: 40px;
  .el-button {
    text-align: center;
    padding: 1px 6px;
    background-color: #ebeef5;
  }
  button {
    display: block;
    width: 40px;
    height: 40px;
    background-color: #f2f5f6;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
    border-radius: 5px;
    border: 0;
  }
}

</style>
